export interface HashSet<T> {
    [key: number | string] : T
}

export interface OptionItem {
    value: number
    text: string
}

export interface PageConfig {
  page: number
  pageSize: number
  total: number
}

export interface MenuItem {
  id: number
  name: string
  icon: string
  path: string
  children: MenuItem[]
}

export interface UserInfo {
    username: string
    name: string
    avatar: string
    token: string
    expireTime: number
  }

export interface BreadItem {
    title: string
    path: string
  }

export interface BannerItem {
    id: number
    title: string
    cover: string
    link: string
    onself: boolean
    updatedAt: number
}

export interface CategoryItem {
    id: number
    title: string
    parentId: number
    sort: number
    children: CategoryItem[] | null
}

export interface ChapterItem {
    id: number
    title: string
    lessonId: number
    lesson: string
    video: string
    duration: number
    onself: boolean
    sort: number
    updatedAt: number
  }

  export interface EbookItem {
    id: number
    title: string
    lessonId: number
    lesson: string
    file: string
    onself: boolean
    sort: number
    updatedAt: number
  }
  
  export interface EbookCreateItem {
    title: string
    file: string
    sort: number
  }

  export interface LessonItem {
    id: number
    title: string
    categoryId: number | number[] | undefined
    categoryTitle: string
    thumb: string
    summary: string
    price: number
    marketPrice: number
    teachers: string
    recommend: boolean
    onself: boolean
    buyCount?: number
    chapterCount?: number
    ebookCount?: number
    sort: number
    updatedAt?: number
  }
  
  export interface ContentItem {
    id: number
    content: string
  }

  export interface StudentItem {
    id: number
    accountId: number
    username: string
    name: string
    nickname: string
    avatar: string
    phone: string
    email: string
    birthday: string
    gender: number
    address: string
    hobby: string
    createdAt: number
}

export interface LessonListItem {
    id: number
    accountId: number
    studentName: string
    lessonId: number
    lessonTitle: string
    expireTime: string
    adminId: number
    studyTimes: number
    createdAt: number
  }

export interface StudentStudyListItem {
    id: number
    accountId: number
    studentName: string
    lessonId: number
    chapterId: number
    chapterTitle: string
    enterTime: number
    leaveTime: number
    studyTimes: number
}

export interface OrderItem {
    id: number
    orderNo: string
    accountId: number
    studentName: string
    lessonId: number
    lessonTitle: string
    status: string
    statusCode: number
    price: number
    createdAt: number
}

export interface OrderOperateItem {
    id: number
    adminId: number
    adminName: string
    operate: string
    description: string
    createdAt: number
}
